/*
 * @Description: 正则表达式实例
 * @Author: zzj
 * @Date: 2021-09-14 16:37:50
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-14 16:40:13
 */
var pattern1 =new RegExp("abc","ig");
var pattern2 = /abc/ig;
console.log(pattern1,pattern2);
console.log(typeof parttern1,typeof pattern2);

var pattern1 = new RegExp("ab+c","i"); 
var pattern2 = /ab+c/i;
var pattern1 = new RegExp("\\w{1,3}","igm");
var pattern2 = /\w{1,3}?/igm;
console.log(pattern1,pattern2);